#include "pch.h"
#include "script_test.h"
#include <script/preprocessor.h>




void test_script_callback( const asSMessageInfo *msg )
{
	switch( msg->type )
	{
	case asMSGTYPE_ERROR: std::cout << "Error: "; break;
	case asMSGTYPE_WARNING: std::cout << "Warning: "; break;
	case asMSGTYPE_INFORMATION: std::cout << "Information: "; break;
	}

	std::cout << msg->section << " (" << msg->row << "): " << msg->message << std::endl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////

void test_script_precompiler()
{
	core::preprocessor preprocessor;
	preprocessor.setMessageCallback( test_script_callback );

	std::vector<std::string> script;

	//ASSERT_EQUAL( true, preprocessor.load( "test.as", script ) );
}
///////////////////////////////////////////////////////////////////////////////////////////////////




void runScript()
{
	cute::suite s;
	s.push_back( cute::test( test_script_precompiler, "script::precompiler" ) );

	cute::ide_listener lis;
	cute::makeRunner( lis )( s, "Script Test" );
};
///////////////////////////////////////////////////////////////////////////////////////////////////
